From: Florian Müllner Date: Wed, 23 Sep 2015 18:43:42 +0000 (+0200) Subject: recorder: Rewrite switch statement X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1201 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=82f84416a9d3f2d983e9207cebcae9e11b50b6ff;p=gnome-shell.git recorder: Rewrite switch statement Avoid compiler warnings about unhandled enum values by using a regular if-else statement. --- diff --git a/src/shell-recorder.c b/src/shell-recorder.c index b28e1e91e..e6d43778f 100644 --- a/src/shell-recorder.c +++ b/src/shell-recorder.c @@ -1182,23 +1182,20 @@ recorder_pipeline_bus_watch (GstBus *bus, { RecorderPipeline *pipeline = data; - switch (message->type) + if (message->type == GST_MESSAGE_EOS) { - case GST_MESSAGE_EOS: recorder_pipeline_closed (pipeline); return FALSE; /* remove watch */ - case GST_MESSAGE_ERROR: - { - GError *error; - - gst_message_parse_error (message, &error, NULL); - g_warning ("Error in recording pipeline: %s\n", error->message); - g_error_free (error); - recorder_pipeline_closed (pipeline); - return FALSE; /* remove watch */ - } - default: - break; + } + else if (message->type == GST_MESSAGE_ERROR) + { + GError *error; + + gst_message_parse_error (message, &error, NULL); + g_warning ("Error in recording pipeline: %s\n", error->message); + g_error_free (error); + recorder_pipeline_closed (pipeline); + return FALSE; /* remove watch */ } /* Leave the watch in place */